# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Blaž Tomažič <blaz.tomazic@gmail.com>

pkgname=clamtk
pkgver=6.14
pkgrel=1
pkgdesc='Easy to use, light-weight, on-demand virus scanner for Linux systems'
url='https://gitlab.com/dave_m/clamtk/-/wikis/home'
arch=('any')
license=('GPL')
depends=('clamav' 'perl' 'perl-gtk3' 'perl-locale-gettext' 'perl-libwww' 'perl-http-message'
         'perl-lwp-protocol-https' 'perl-text-csv' 'perl-json' 'python' 'zenity' 'desktop-file-utils'
         'cron')
source=(https://github.com/dave-theunsub/clamtk/releases/download/v${pkgver}/clamtk-${pkgver}.tar.xz{,.asc})
sha512sums=('e5fb584f85f7e89eae10ed15ffa0268ecf79d81baf2bbf5d5974c080014d7fe24e4350c0139e8372d0e45a94302a0ec2cd824d05e04fee29dc681cbaf9d0fe14'
            'SKIP')
validpgpkeys=('5DD47B3B121EE5C354A20305F51D19546ADA59DE') # Dave Mauroni <dave.nerd@gmail.com>

package() {
  cd ${pkgname}-${pkgver}

  install -Dm 755 clamtk -t "${pkgdir}/usr/bin"
  for f in lib/* ; do
    install -Dm 644 "${f}" "${pkgdir}/usr/share/perl5/vendor_perl/ClamTk/$(basename "${f}")"
  done

  for f in po/*.mo ; do
    install -Dm 644 "${f}" "${pkgdir}/usr/share/locale/$(basename "${f}" .mo)/LC_MESSAGES/clamtk.mo"
  done

  install -Dm 644 clamtk.1.gz -t "${pkgdir}/usr/share/man/man1"
  install -Dm 644 CHANGES DISCLAIMER README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"

  install -Dm 644 images/clamtk.{xpm,png} -t "${pkgdir}/usr/share/pixmaps"
  install -Dm 644 clamtk.desktop -t "${pkgdir}/usr/share/applications"
}

# vim: ts=2 sw=2 et:
